<template>
<div class="content">
  <Tabs class="tabs" v-model="activeName" :animated="false">
    <Tab-pane label="设备告警" name="deviceAlarmList">
      <deviceAlarmList v-if="activeName=='deviceAlarmList'"></deviceAlarmList>
    </Tab-pane>
    <Tab-pane label="故障上报" name="faultList">
      <faultList v-if="activeName=='faultList'"></faultList>
    </Tab-pane>
  </Tabs>
</div>
</template>

<script>
import deviceAlarmList from "@/pages/device/deviceAlarmList";
import faultList from "./faultList";
export default {
  name: "index",
  computed:{
    // ...mapState('admin/device', [
    //   'deviceTabName'
    // ]),
    name:function (){
      return this.$route.query.name
    }
  },
  data(){
    return {
      activeName:'deviceAlarmList'
    }
  },
  mounted() {
    if(this.name){
      this.activeName=this.name;
    }
  },
  components:{deviceAlarmList,faultList}
}
</script>

<style scoped>

</style>